#!/bin/sh

APP_HOME=/data/project/cth
AppName=sncoal-cth-api-zjm.jar
AppPath=$APP_HOME/$AppName
LOG_PATH=$APP_HOME/logs/$AppName.log
JVM_OPTS="-Dname=$AppName -Dspring.config.location=$APP_HOME/application-server.yaml  -Duser.timezone=Asia/Shanghai   -Dfile.encoding=UTF-8 -server -Xms8192m -Xmx8192m -Xmn4096m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:SurvivorRatio=10 -XX:MaxTenuringThreshold=15 -XX:NewRatio=2 -XX:+DisableExplicitGC"
JAVA_HOME=/data/soft/jdk1.8.0_181/bin

echo "APP_HOME $APP_HOME"
echo "AppName $AppName"
echo "AppPath $AppPath"
echo "LOG_PATH $LOG_PATH"
echo "JVM_OPTS $JVM_OPTS"
echo "JAVA_HOME $JAVA_HOME"

nohup $JAVA_HOME/java -jar  $JVM_OPTS $AppPath > $LOG_PATH 2>&1 &